home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 4665 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.3 KB

  1. Path: airdmhor.gen.nz!not-for-mail
  2. From: gumboot@airdmhor.gen.nz (Simon Hosie)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: void main() and other atrocities!
  5. Date: 7 Feb 1996 01:44:47 +1300
  6. Organization: Airdmhor
  7. Message-ID: <4f7ifv$8l4@airdmhor.gen.nz>
  8. References: <4eduaj$1aq@grouper.Exis.Net> <4epplj$egf@host-3.cyberhighway.net> <4erjn2INN38b@keats.ugrad.cs.ubc.ca> <9602021300.AA04359@dxmint.cern.ch> <4f2rahINNmud@keats.ugrad.cs.ubc.ca>
  9. NNTP-Posting-Host: airdmhor.gen.nz
  10. X-Newsreader: TIN [version 1.2 PL2]
  11.  
  12. Kazimir Kylheku:
  13. > It's also atrocious that main() has to be treated as a special language
  14. > construct, and that a call to exit() in main() (when it is the last statement)
  15. > is to be identical to a return.
  16.  
  17.   It's already a special case in that the program starts there.
  18.  
  19.  
  20. > I did read the relevant section in the FAQ. It is merely concerned with the
  21. > issue of eliminating compiler warnings stemming from calling exit() in main()
  22. > despite a "void" declaration thereof. The issue that a void function may
  23. > not be compatible with a call to an int function doesn't seem that significant,
  24. > since nobody in their right mind would design a compiler that way.
  25.  
  26.   How about an operating system?  Nah, they'd never make an operating system
  27. that expected a return value from a program, would they?
  28.